/* 
This do file produces the summary statistics for Table 1.
NOTES:

*/

clear all

*change "mainpath" below to your folder location
global mainpath `"Z:/user/rih4/Solar Siting"'

*shouldn't need to change these paths if your folders are named the same
cd `"${mainpath}/JAERE Code Repository"'
global data_path `"Data JAERE"'
global data_intermediate `"${data_path}/intermediate_output"'
global data_final `"${data_path}/final_output"'
global scripts_subsidies `"Scripts - Subsidies"'

import excel `"${scripts_subsidies}/Solar_Incentives_Data_no_severin_data.xlsx"', sheet("Table2") cellrange(A1:D50) firstrow case(lower)
rename  npvwnetmeteringskwh Subsidy
rename state_wtd_avg_damkwh Avoided_Damages
rename subwnetmeteringavoidedda Net
export delimited using `"${data_final}/table2.csv"', replace

clear all
import excel `"${scripts_subsidies}/Solar_Incentives_Data_no_severin_data.xlsx"', sheet("Table_Historical") cellrange(A1:D50) firstrow case(lower)
rename   npvoftotaltimevaryingincent Historical_Subsidy
rename state_wtd_avg_damkwh Avoided_Damages
rename historicalsubwavoideddama Net
export delimited using `"${data_final}/tableA3.csv"', replace
 